import { Tag } from 'antd';
import React from 'react';

// 获取难度标签
export const getDifficultyTag = (difficulty: string) => {
  switch (difficulty) {
    case 'Low':
    case 'low':
      return <Tag color="success">简单</Tag>;
    case 'Mid':
    case 'mid':
      return <Tag color="warning">中等</Tag>;
    case 'High':
    case 'high':
      return <Tag color="error">困难</Tag>;
    case 'all':
    case 'All':
      return <Tag color="default">全部</Tag>;
    default:
      return <Tag color="default">{difficulty}</Tag>;
  }
}; 